package com.edu.yunnote.dto;

/**
 * 响应给前台的信息
 *
 */
public class WebResponse {
	
	private Integer statusCode;
	private String statusMsg;
	private String token;
	/**
	 * 结果
	 */
	private Object data;
	
	public Integer getStatusCode() {
		return statusCode;
	}
	public void setStatusCode(Integer statusCode) {
		this.statusCode = statusCode;
	}
	public String getStatusMsg() {
		return statusMsg;
	}
	public void setStatusMsg(String statusMsg) {
		this.statusMsg = statusMsg;
	}
	public String getToken() {
		return token;
	}
	public void setToken(String token) {
		this.token = token;
	}
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}
	
	
	public void setWebResponse(Integer statusCode, String statusMsg, String token, Object data) {
		if(statusCode!=null)
			this.setStatusCode(statusCode);
		if(statusMsg!=null)
			this.setStatusMsg(statusMsg);
		if(data!=null)
			this.setData(data);
		if(token!=null)
			this.setToken(token);
	}
	
	
	@Override
	public String toString() {
		return "WebResponse [statusCode=" + statusCode + ", statusMsg=" + statusMsg + ", token=" + token + ", data="
				+ data + "]";
	}


}

